from django.core.handlers.wsgi import WSGIRequest

from firstDjango.decorators import post

clip_connect = "default"


def load_connect(request: WSGIRequest):
    return clip_connect


@post()
def set_connect(request: WSGIRequest, data):
    global clip_connect
    clip_connect = data["connect"]
    return "ok"
